From cbe47c02a125988e5153ff957c48ec7b338da93d Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 17 Apr 2014 13:05:11 +0200 Subject: [PATCH] swipe: Don't emit ::swipe if there are still active touches Avoids sending spurious signals when an extra touch happens. --- gtk/gtkgestureswipe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkgestureswipe.c b/gtk/gtkgestureswipe.c index c322566b59..25a714e69b 100644 --- a/gtk/gtkgestureswipe.c +++ b/gtk/gtkgestureswipe.c @@ -172,6 +172,9 @@ gtk_gesture_swipe_end (GtkGesture *gesture, if (gtk_gesture_get_sequence_state (gesture, seq) == GTK_EVENT_SEQUENCE_DENIED) return; + if (gtk_gesture_is_active (gesture)) + return; + priv = gtk_gesture_swipe_get_instance_private (swipe); _gtk_gesture_swipe_calculate_velocity (swipe, &velocity_x, &velocity_y); g_signal_emit (gesture, signals[SWIPE], 0, velocity_x, velocity_y); -- 2.30.2